﻿using INTEX.DataBase;
using INTEX.DataBase.Tools;
using ReflectionStudio.Core;
using ReflectionStudio.Core.Events;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.OracleClient;
using System.IO;
using System.Linq;
using System.Windows;
namespace WPFExcelReport
{
    public partial class ITXEXRPT
    {
        public void YCAEK02LIST(DataSet db)
        {
            try
            { 
                DataTable dtSoruce = db.Tables["EKPOS"];
                DataTable dtOutput = new DataTable();
                dtOutput.Columns.Add("LSLIEFNA", typeof(System.String));
                dtOutput.Columns.Add("FSKOLL", typeof(System.String));
                dtOutput.Columns.Add("FSARTPRGR", typeof(System.String));
                dtOutput.Columns.Add("EKPMEEH", typeof(System.String));
                dtOutput.Columns.Add("EKPME1", typeof(System.String));
                dtOutput.Columns.Add("EKPWE1", typeof(System.String));
                dtOutput.Merge(dtSoruce, false, MissingSchemaAction.Ignore);
                exAgent.DataTableToExcel(dtOutput, 3, 1);
                int count = dtOutput.Rows.Count;
                exAgent.SetCellValue(1, 1, 1);
                exAgent.BatchConvert2Number(2, 5, count + 1, 6);
                exAgent.SetCellValue(1, 1, "供应商评估");
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
            finally
            {
                EventDispatcher.Instance.RaiseStatus("完成", StatusEventType.StopProgress);
            }
        }

    }
}